package top.jianx.demo.shiro.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @Description
 * @ClassName User
 * @Author Jianx  <[email]jianx@jianx.top>
 * @date 2020.03.03
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "用户实体类")
public class User {

//    @NotNull(message = "用户id不能为空")
    private Integer id;

    @ApiModelProperty()
    @NotNull(message = "用户账号不能为空")
    @Size(min = 6, max = 11, message = "账号长度必须是6-11个字符")
    private String name;

    @NotNull(message = "用户密码不能为空")
    @Size(min = 6, max = 18, message = "账号长度必须是6-18个字符")
    private String password;

    private String perms;
}
